package com.leiyuee.JavaBase;

//抽象类测试

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * employee设置为抽象类后 ，不能直接创建对象
 */
public class AbstractDemo {
    public static void main(String[] args) throws ParseException {
      //  Employee e = new Employee("name","address",12);
        Salary s = new Salary("name","address",12,12);

        System.out.println(s.toString());
        System.out.println(s.doSth());

        double a = 1.2;
        double b = a+0.1;
        System.out.println(b);



        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
//        Date nowDate = new Date();
//
//        nowDate = formatter.parse(String.valueOf(nowDate));
        Date da = new Date();
//        System.out.println(nowDate.toString()
        formatter.format(da);
    }
}
